<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>QCNSim: Route Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">QCNSim
   </div>
   <div id="projectbrief">Simulator for Quake-Catcher Network</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_route-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Route Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="class_route.html" title="Route class. ">Route</a> class.  
 <a href="class_route.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_route_8h_source.html">Route.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a2b1c971aaf032109cee8081c97e9b9e9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_route.html#a2b1c971aaf032109cee8081c97e9b9e9">Route</a> ()</td></tr>
<tr class="memdesc:a2b1c971aaf032109cee8081c97e9b9e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#a2b1c971aaf032109cee8081c97e9b9e9">More...</a><br/></td></tr>
<tr class="separator:a2b1c971aaf032109cee8081c97e9b9e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d3e3957f18c1658494df28a47c31891"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_route.html#a2d3e3957f18c1658494df28a47c31891">Route</a> (std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt; <a class="el" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a>)</td></tr>
<tr class="memdesc:a2d3e3957f18c1658494df28a47c31891"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor with route.  <a href="#a2d3e3957f18c1658494df28a47c31891">More...</a><br/></td></tr>
<tr class="separator:a2d3e3957f18c1658494df28a47c31891"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f045eb09f6f8cd861eec4a6a2ab6162"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="class_entity.html">Entity</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_route.html#a0f045eb09f6f8cd861eec4a6a2ab6162">getExplicitRoute</a> () const </td></tr>
<tr class="memdesc:a0f045eb09f6f8cd861eec4a6a2ab6162"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get explicit route.  <a href="#a0f045eb09f6f8cd861eec4a6a2ab6162">More...</a><br/></td></tr>
<tr class="separator:a0f045eb09f6f8cd861eec4a6a2ab6162"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a423fa64c12ce8c6a3814f88e78fdf713"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="class_entity.html">Entity</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_route.html#a423fa64c12ce8c6a3814f88e78fdf713">getRecordedRoute</a> () const </td></tr>
<tr class="memdesc:a423fa64c12ce8c6a3814f88e78fdf713"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get value of flag recordThisRoute.  <a href="#a423fa64c12ce8c6a3814f88e78fdf713">More...</a><br/></td></tr>
<tr class="separator:a423fa64c12ce8c6a3814f88e78fdf713"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea208ca1d1beea85359d6bd39eb142fb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_route.html#aea208ca1d1beea85359d6bd39eb142fb">setExplicitRoute</a> (std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt; <a class="el" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a>)</td></tr>
<tr class="memdesc:aea208ca1d1beea85359d6bd39eb142fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set explicit route token must follow.  <a href="#aea208ca1d1beea85359d6bd39eb142fb">More...</a><br/></td></tr>
<tr class="separator:aea208ca1d1beea85359d6bd39eb142fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fb075c7ea3e111c16bfd5222fa5074c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_route.html#a4fb075c7ea3e111c16bfd5222fa5074c">addHopToRecordedRoute</a> (std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; hop)</td></tr>
<tr class="memdesc:a4fb075c7ea3e111c16bfd5222fa5074c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set flag to record the route followed by token to TRUE.  <a href="#a4fb075c7ea3e111c16bfd5222fa5074c">More...</a><br/></td></tr>
<tr class="separator:a4fb075c7ea3e111c16bfd5222fa5074c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c1ae064ef11575ae6d75feebadb8777"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_route.html#a7c1ae064ef11575ae6d75feebadb8777">getNextHopFromExplicitRoute</a> ()</td></tr>
<tr class="memdesc:a7c1ae064ef11575ae6d75feebadb8777"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the next hop from the explicit route vector.  <a href="#a7c1ae064ef11575ae6d75feebadb8777">More...</a><br/></td></tr>
<tr class="separator:a7c1ae064ef11575ae6d75feebadb8777"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:aa2dd022debe37b4f2e0b1d292756b481"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="class_entity.html">Entity</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a></td></tr>
<tr class="memdesc:aa2dd022debe37b4f2e0b1d292756b481"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vector containing a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects representing the route to be followed by a token/PDU.  <a href="#aa2dd022debe37b4f2e0b1d292756b481">More...</a><br/></td></tr>
<tr class="separator:aa2dd022debe37b4f2e0b1d292756b481"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb06471ef9e90e1a6f24cbf8ad214f2a"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_route.html#aeb06471ef9e90e1a6f24cbf8ad214f2a">explicitRouteNextHopIndex</a></td></tr>
<tr class="memdesc:aeb06471ef9e90e1a6f24cbf8ad214f2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index pointing to the next <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> to which the token/PDU is to be forwarded.  <a href="#aeb06471ef9e90e1a6f24cbf8ad214f2a">More...</a><br/></td></tr>
<tr class="separator:aeb06471ef9e90e1a6f24cbf8ad214f2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6489904d8f11f6c7e10ff391c7c50a30"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="class_entity.html">Entity</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_route.html#a6489904d8f11f6c7e10ff391c7c50a30">recordedRoute</a></td></tr>
<tr class="memdesc:a6489904d8f11f6c7e10ff391c7c50a30"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_route.html" title="Route class. ">Route</a> that was followed by token/PDU, currently being recorded.  <a href="#a6489904d8f11f6c7e10ff391c7c50a30">More...</a><br/></td></tr>
<tr class="separator:a6489904d8f11f6c7e10ff391c7c50a30"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a48f5c1ca47af8dc65eca7e0274de96e2"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_route.html#a48f5c1ca47af8dc65eca7e0274de96e2">Token</a></td></tr>
<tr class="separator:a48f5c1ca47af8dc65eca7e0274de96e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_route.html" title="Route class. ">Route</a> class. </p>
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>August 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </dd></dl>
<dl class="section user"><dt>Description</dt><dd>This class models routes within a network, to be followed by tokens or by PDUs. A route is basically a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects a token will follow throughout the network of facilities, in a low-level point of view. In a high-level point of view, a token/PDU will follow nodes and links, each of these Entities. A typical route will indicate nodes only, however. High-level functions must abstract the nodes and populate links to complete a route. </dd></dl>

<p>Definition at line <a class="el" href="_route_8h_source.html#l00035">35</a> of file <a class="el" href="_route_8h_source.html">Route.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a2b1c971aaf032109cee8081c97e9b9e9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Route::Route </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor. </p>
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>August 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </dd></dl>

<p>Definition at line <a class="el" href="_route_8cpp_source.html#l00025">25</a> of file <a class="el" href="_route_8cpp_source.html">Route.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;            : <a class="code" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a>(), <a class="code" href="class_route.html#aeb06471ef9e90e1a6f24cbf8ad214f2a">explicitRouteNextHopIndex</a>(), <a class="code" href="class_route.html#a6489904d8f11f6c7e10ff391c7c50a30">recordedRoute</a>() {</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;}</div>
<div class="ttc" id="class_route_html_aa2dd022debe37b4f2e0b1d292756b481"><div class="ttname"><a href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">Route::explicitRoute</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; explicitRoute</div><div class="ttdoc">Vector containing a list of Entity objects representing the route to be followed by a token/PDU...</div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00037">Route.h:37</a></div></div>
<div class="ttc" id="class_route_html_aeb06471ef9e90e1a6f24cbf8ad214f2a"><div class="ttname"><a href="class_route.html#aeb06471ef9e90e1a6f24cbf8ad214f2a">Route::explicitRouteNextHopIndex</a></div><div class="ttdeci">size_t explicitRouteNextHopIndex</div><div class="ttdoc">Index pointing to the next Entity to which the token/PDU is to be forwarded. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00039">Route.h:39</a></div></div>
<div class="ttc" id="class_route_html_a6489904d8f11f6c7e10ff391c7c50a30"><div class="ttname"><a href="class_route.html#a6489904d8f11f6c7e10ff391c7c50a30">Route::recordedRoute</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; recordedRoute</div><div class="ttdoc">Route that was followed by token/PDU, currently being recorded. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00042">Route.h:42</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2d3e3957f18c1658494df28a47c31891"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Route::Route </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt;&#160;</td>
          <td class="paramname"><em>explicitRoute</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor with route. </p>
<p>RecordThisRoute flag is set to false by default.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">explicitRoute</td><td>Vector containing a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects representing the route to be followed by a token/PDU. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_route_8cpp_source.html#l00036">36</a> of file <a class="el" href="_route_8cpp_source.html">Route.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;                                                          : <a class="code" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a>(<a class="code" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a>), <a class="code" href="class_route.html#a6489904d8f11f6c7e10ff391c7c50a30">recordedRoute</a>(), <a class="code" href="class_route.html#aeb06471ef9e90e1a6f24cbf8ad214f2a">explicitRouteNextHopIndex</a>(0) {</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;}</div>
<div class="ttc" id="class_route_html_aa2dd022debe37b4f2e0b1d292756b481"><div class="ttname"><a href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">Route::explicitRoute</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; explicitRoute</div><div class="ttdoc">Vector containing a list of Entity objects representing the route to be followed by a token/PDU...</div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00037">Route.h:37</a></div></div>
<div class="ttc" id="class_route_html_aeb06471ef9e90e1a6f24cbf8ad214f2a"><div class="ttname"><a href="class_route.html#aeb06471ef9e90e1a6f24cbf8ad214f2a">Route::explicitRouteNextHopIndex</a></div><div class="ttdeci">size_t explicitRouteNextHopIndex</div><div class="ttdoc">Index pointing to the next Entity to which the token/PDU is to be forwarded. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00039">Route.h:39</a></div></div>
<div class="ttc" id="class_route_html_a6489904d8f11f6c7e10ff391c7c50a30"><div class="ttname"><a href="class_route.html#a6489904d8f11f6c7e10ff391c7c50a30">Route::recordedRoute</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; recordedRoute</div><div class="ttdoc">Route that was followed by token/PDU, currently being recorded. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00042">Route.h:42</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a4fb075c7ea3e111c16bfd5222fa5074c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Route::addHopToRecordedRoute </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>hop</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set flag to record the route followed by token to TRUE. </p>
<p>Unset flag to record the route followed by token (set to FALSE). Record hop within recorded route.</p>
<p>This function should only be executed with corresponding recordThisRoute within <a class="el" href="class_token.html" title="Token class. ">Token</a> class is set. <a class="el" href="class_token.html" title="Token class. ">Token</a> class must assure that.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hop</td><td><a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object to record in the route. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_route_8cpp_source.html#l00099">99</a> of file <a class="el" href="_route_8cpp_source.html">Route.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;                                                           {</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <a class="code" href="class_route.html#a6489904d8f11f6c7e10ff391c7c50a30">recordedRoute</a>.push_back(hop);</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;}</div>
<div class="ttc" id="class_route_html_a6489904d8f11f6c7e10ff391c7c50a30"><div class="ttname"><a href="class_route.html#a6489904d8f11f6c7e10ff391c7c50a30">Route::recordedRoute</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; recordedRoute</div><div class="ttdoc">Route that was followed by token/PDU, currently being recorded. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00042">Route.h:42</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0f045eb09f6f8cd861eec4a6a2ab6162"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; &gt; Route::getExplicitRoute </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get explicit route. </p>
<dl class="section return"><dt>Returns</dt><dd>Explicit route within this object. </dd></dl>

<p>Definition at line <a class="el" href="_route_8cpp_source.html#l00044">44</a> of file <a class="el" href="_route_8cpp_source.html">Route.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                                                               {</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;}</div>
<div class="ttc" id="class_route_html_aa2dd022debe37b4f2e0b1d292756b481"><div class="ttname"><a href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">Route::explicitRoute</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; explicitRoute</div><div class="ttdoc">Vector containing a list of Entity objects representing the route to be followed by a token/PDU...</div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00037">Route.h:37</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a7c1ae064ef11575ae6d75feebadb8777"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; Route::getNextHopFromExplicitRoute </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets the next hop from the explicit route vector. </p>
<p>This function fetches the next hop within the explicit route vector by using the iterator. It also increments the iterator such that subsequent calls will follow the path. If the end of the vector is reached, this function just returns the last hop. If there is no explicit route, then this function returns NULL.</p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_entity.html" title="Entity class. ">Entity</a> pointer as the next hop. </dd></dl>

<p>Definition at line <a class="el" href="_route_8cpp_source.html#l00114">114</a> of file <a class="el" href="_route_8cpp_source.html">Route.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                                                         {</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a>.empty()) {</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keywordflow">return</span> NULL; <span class="comment">// No explicit route; return NULL.</span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    }</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="comment">// If index points to end(), then return the last hop.</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_route.html#aeb06471ef9e90e1a6f24cbf8ad214f2a">explicitRouteNextHopIndex</a> &gt;= <a class="code" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a>.size()) {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a>.back();</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordtype">size_t</span> currentNextHopIndex = <a class="code" href="class_route.html#aeb06471ef9e90e1a6f24cbf8ad214f2a">explicitRouteNextHopIndex</a>; <span class="comment">// Get next hop index before we increment it.</span></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    ++<a class="code" href="class_route.html#aeb06471ef9e90e1a6f24cbf8ad214f2a">explicitRouteNextHopIndex</a>; <span class="comment">// Advance index to hop after next.</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a>.at(currentNextHopIndex);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;}<div class="ttc" id="class_route_html_aa2dd022debe37b4f2e0b1d292756b481"><div class="ttname"><a href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">Route::explicitRoute</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; explicitRoute</div><div class="ttdoc">Vector containing a list of Entity objects representing the route to be followed by a token/PDU...</div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00037">Route.h:37</a></div></div>
<div class="ttc" id="class_route_html_aeb06471ef9e90e1a6f24cbf8ad214f2a"><div class="ttname"><a href="class_route.html#aeb06471ef9e90e1a6f24cbf8ad214f2a">Route::explicitRouteNextHopIndex</a></div><div class="ttdeci">size_t explicitRouteNextHopIndex</div><div class="ttdoc">Index pointing to the next Entity to which the token/PDU is to be forwarded. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00039">Route.h:39</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a423fa64c12ce8c6a3814f88e78fdf713"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; &gt; Route::getRecordedRoute </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get value of flag recordThisRoute. </p>
<dl class="section return"><dt>Returns</dt><dd>True is route is being recorded; false if route is not being recorded. Get recorded route so far.</dd>
<dd>
Current recorded route or path travelled by token. </dd></dl>

<p>Definition at line <a class="el" href="_route_8cpp_source.html#l00062">62</a> of file <a class="el" href="_route_8cpp_source.html">Route.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                                                               {</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_route.html#a6489904d8f11f6c7e10ff391c7c50a30">recordedRoute</a>;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;}</div>
<div class="ttc" id="class_route_html_a6489904d8f11f6c7e10ff391c7c50a30"><div class="ttname"><a href="class_route.html#a6489904d8f11f6c7e10ff391c7c50a30">Route::recordedRoute</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; recordedRoute</div><div class="ttdoc">Route that was followed by token/PDU, currently being recorded. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00042">Route.h:42</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aea208ca1d1beea85359d6bd39eb142fb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Route::setExplicitRoute </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt;&#160;</td>
          <td class="paramname"><em>explicitRoute</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set explicit route token must follow. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">explicitRoute</td><td>Explicit route token must follow. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_route_8cpp_source.html#l00071">71</a> of file <a class="el" href="_route_8cpp_source.html">Route.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                                                                           {</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    this-&gt;<a class="code" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a> = <a class="code" href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">explicitRoute</a>;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <a class="code" href="class_route.html#aeb06471ef9e90e1a6f24cbf8ad214f2a">explicitRouteNextHopIndex</a> = 0;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;}</div>
<div class="ttc" id="class_route_html_aa2dd022debe37b4f2e0b1d292756b481"><div class="ttname"><a href="class_route.html#aa2dd022debe37b4f2e0b1d292756b481">Route::explicitRoute</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; explicitRoute</div><div class="ttdoc">Vector containing a list of Entity objects representing the route to be followed by a token/PDU...</div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00037">Route.h:37</a></div></div>
<div class="ttc" id="class_route_html_aeb06471ef9e90e1a6f24cbf8ad214f2a"><div class="ttname"><a href="class_route.html#aeb06471ef9e90e1a6f24cbf8ad214f2a">Route::explicitRouteNextHopIndex</a></div><div class="ttdeci">size_t explicitRouteNextHopIndex</div><div class="ttdoc">Index pointing to the next Entity to which the token/PDU is to be forwarded. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00039">Route.h:39</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="a48f5c1ca47af8dc65eca7e0274de96e2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="class_token.html">Token</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="_route_8h_source.html#l00058">58</a> of file <a class="el" href="_route_8h_source.html">Route.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="aa2dd022debe37b4f2e0b1d292756b481"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;std::shared_ptr&lt;<a class="el" href="class_entity.html">Entity</a>&gt; &gt; Route::explicitRoute</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Vector containing a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects representing the route to be followed by a token/PDU. </p>

<p>Definition at line <a class="el" href="_route_8h_source.html#l00037">37</a> of file <a class="el" href="_route_8h_source.html">Route.h</a>.</p>

</div>
</div>
<a class="anchor" id="aeb06471ef9e90e1a6f24cbf8ad214f2a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t Route::explicitRouteNextHopIndex</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Index pointing to the next <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> to which the token/PDU is to be forwarded. </p>

<p>Definition at line <a class="el" href="_route_8h_source.html#l00039">39</a> of file <a class="el" href="_route_8h_source.html">Route.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6489904d8f11f6c7e10ff391c7c50a30"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;std::shared_ptr&lt;<a class="el" href="class_entity.html">Entity</a>&gt; &gt; Route::recordedRoute</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="class_route.html" title="Route class. ">Route</a> that was followed by token/PDU, currently being recorded. </p>

<p>Definition at line <a class="el" href="_route_8h_source.html#l00042">42</a> of file <a class="el" href="_route_8h_source.html">Route.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>QcnSim/<a class="el" href="_route_8h_source.html">Route.h</a></li>
<li>QcnSim/<a class="el" href="_route_8cpp_source.html">Route.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Nov 14 2013 11:18:24 for QCNSim by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
